#!/usr/bin/python
import hashlib

def md5sum(filename):             
    '''获取文件Md5值'''
    fd = open(filename,"r")  
    fcont = fd.read()
    fd.close()           
    fmd5 = hashlib.md5(fcont)  
    return fmd5.hexdigest()
